﻿using System.Web.Http;
using CompanySearch.Library.WebApi;
using Microsoft.Owin.FileSystems;
using Microsoft.Owin.StaticFiles;
using Owin;

namespace CompanySearch.Library
{
    public class Startup
    {
        public void Configuration(IAppBuilder builder)
        {
           var options = new FileServerOptions
            {
                EnableDirectoryBrowsing = true,
                FileSystem = new PhysicalFileSystem(@"website")
                //FileSystem = new PhysicalFileSystem(@"..\..\..\CompanySearch.Library\website")
            };
            builder.UseFileServer(options);

            var config = new HttpConfiguration();
            WebApiConfig.Register(config);
            config.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
            builder.UseWebApi(config);
        }
    }
}
